#include "DHT11.h"


DHT11 dht11(9);

void setup()
{
    Serial.begin(9600);
}
void loop()
{
    dht11.read();
    check(dht11);
    Serial.print("摄氏温度:");//打印出"摄氏温度:"
    Serial.println((float)dht11.temperature,2);//打印摄氏温度结果
    Serial.print("华氏温度:");//打印出"华氏温度:"
    Serial.println(Fahrenheit(dht11.temperature),2);//打印华氏温度结果
    Serial.print("开氏温度:");//打印出"开氏温度:"
    Serial.println(Kelvin(dht11.temperature), 2);//打印开氏温度结果
    Serial.print("湿度:");//打印出"湿度:"
    Serial.print((float)dht11.humidity, 2);//打印出湿度结果
    Serial.println("%");//打印出"%"
    Serial.print("露点:");//打印出"快速计算露点:"
    Serial.println(dewPoint(dht11.temperature, dht11.humidity));//打印出露点结果
    Serial.print("露点(快速):");//打印出"快速计算露点:"
    Serial.println(dewPointFast(dht11.temperature, dht11.humidity));//打印出露点结果
    delay(1000);//延时一段时间
}